import request from '@/utils/request'

// 查询科技档案 案卷管理列表
export function listArch(query) {
    return request({
        url: '/system/RecKejiPaperManagement/list',
        method: 'get',
        params: query
    })
}

// 查询科技档案 案卷管理详细
export function getArch(id) {
    return request({
        url: '/system/RecKejiPaperManagement/' + id,
        method: 'get'
    })
}

// 新增科技档案 案卷管理
export function addArch(data) {
    return request({
        url: '/system/RecKejiPaperManagement',
        method: 'post',
        data: data
    })
}

// 修改科技档案 案卷管理
export function updateArch(data) {
    return request({
        url: '/system/RecKejiPaperManagement',
        method: 'put',
        data: data
    })
}

// 删除科技档案 案卷管理
export function delArch(id) {
    return request({
        url: '/system/RecKejiPaperManagement/' + id,
        method: 'delete'
    })
}

// 按案卷题名查询案卷管理列表
export function listArchByName(query) {
    return request({
      url: '/system/RecKejiPaperManagement/listByName',
      method: 'get',
      params: query
    })
}

// 申请归档
export function updateApply(ids) {
    return request({
      url: '/system/RecKejiPaperManagement/apply/' + ids,
      method: 'put'
    })
  }
    // 归档通过
  export function updateApprove(ids) {
    return request({
      url: '/system/RecKejiPaperManagement/approve/' + ids,
      method: 'put'
    })
  }
  // 归档拒绝
  export function updateReject(ids) {
    return request({
      url: '/system/RecKejiPaperManagement/reject/' + ids,
      method: 'put'
    })
  }